1. Field of the Invention
The present invention relates to performing wavetable processing using a processor, and more specifically, to a method and an apparatus for performing wavetable processing using a vector processor with routable operands and independently selectable operations.
2. Description of the Related Art
The pursuit of higher performance has long been a defining feature of the computer and microprocessor industries. In many applications such as computer-aided design and graphics, higher performance is always needed to quickly translate users' commands into actions, thereby enhancing their productivity. Currently, the IBM PC computer architecture, based on Intel Corporation's X-86 family of processors, is an industry-standard architecture for personal computers. Because the IBM PC architecture is an industry standard, the architecture has attracted a broad array of software vendors who develop IBM PC compatible software. Furthermore, competition within the industry standard architecture has resulted in dramatic price performance improvements, thereby leading to a more rapid acceptance of computing technology by end users. Thus, the standardized nature of the IBM PC architecture has catapulted IBM PC compatible machines to a dominant market position.
The standardized nature of the IBM PC architecture is also a double-edged sword, for if the computer is not PC compatible, the sales potential for the computer becomes severely diminished. The reason for the limitation is that much of the existing software that runs on the PCs make explicit assumptions about the nature of the hardware. If the hardware provided by the computer manufacturer does not conform to those standards, these software programs will not be usable. Thus, PC system designers are constrained to evolutionary rather than revolutionary advances in the PC architecture in order to remain compatible with earlier IBM PC computers. However, it is desirable to take advantage of the semiconductor industry's ability to integrate large numbers of transistors per chip to satisfy the pent-up demand for more computing power in communication, multimedia and other consumer products.
The trend toward multimedia such as audio and image processing has increased the need for a processor capable of performing audio processing. Traditionally, the definition of multimedia on personal computers has meant the incorporation of a compact disk read-only memory (CD-ROM) drive and a sound board with frequency modulated (FM) audio synthesis. However, such simplistic definition of multimedia is being rapidly altered by advances in IC technology. Modem consumers today demand real time multimedia, requiring compression and decompression capability for streams of video as well as sound. Additionally, the multimedia systems need to generate realistic sounds on a real-time basis.
Sound is produced by vibrations called sound waves which are transmitted over a media such as air. In their natural state, sound waves are analog, which rise and fall, changing in frequency and amplitude in smooth progressions. Normally, sound waves can be represented as a collection of sine or sinusoidal waves. The sine wave is a pure tone, such that only a single note can be heard without any undertones or overtones. When a sound wave is produced repeatedly and regularly, the sound acquires a fixed pitch, just like a musical note. However, when a sound wave is an irregular pattern, it has little or no pitch and produces an irregular sound, such as a loud bang. The frequency of a sound is determined by the number of times the wave is repeated during a given period. Furthermore, pitch is determined by frequency. As frequency rises, the pitch goes higher.
Generally, most natural sounds are much more complicated than a conventional sine wave. These complications make up the timbre, or characteristic tonal quality of the sound. Timbre is made up of several elements, including the shape of the envelope of the sound wave and the complexity of the frequency pattern within the envelope. Thus, although a sound wave is fundamentally a sine wave, the representation of real sounds can be quite complex.
A number of different technologies can be used to create sounds in music synthesizers. Two widely used techniques are frequency modulation (FM) synthesis and wavetable synthesis. FM synthesis techniques generally use one periodic signal which is derived from a modulator to modulate the frequency of another signal (the carrier). If the modulating signal is in the audible range, then the result will be a significant change in the timbre of the carrier signal. FM synthesis techniques are very useful for creating expressive new synthesized sounds. However, if the goal of the synthesis system is to recreate the sound of some existing instrument, this can be done generally more accurately with digital sample-based techniques.
Digital sampling systems store high quality sound samples digitally, and then replay these sounds on demand. To capture the analog sound waves, the computer system typically employs an analog-to-digital converter (ADC), which converts the analog audio signal into digital values suitable for processing. Digital sample based synthesis systems may employ a variety of special techniques such as sample looping, pitch shifting, mathematical interpolation, and polyphonic digital filtering, to reduce the amount of memory required to store the sound samples or to obtain more types of sounds from a given amount of memory. These sample based synthesis systems are often called wavetable synthesizers because the sample memory in these systems contains a large number of sampled sound segments and can be thought of as a "table" of sound waveforms, which may be looked up and then utilized when needed. Thus, the term wavetable synthesis is used to describe this audio generation technology.
Typically, in a wavetable synthesis system, the sample data is edited and processed before they become sample sounds suitable for use in the wavetable synthesis system. The requirements for editing the original sample data identifies and extracts the initial and looped segments, and further resamples the data if necessary to obtain a pitch period length that is an integer multiple of the sampling. When all the sample processing has been completed, the resulting sample sound sequence for the various instruments are tabulated to form the sample memory for the synthesizer.
To maximize memory utilization, one primary technique used in wavetable synthesizers to conserve sample memory space is the looping of sample sound segments. For a large number of instrument sounds, the sound can be modeled as consisting of two major section: an attack section and a sustain section. The attack section is the initial part of the sound, where the amplitude and the spectral characteristics of the sound may be changing very rapidly. The sustain section of the sound follows the attack section, with the characteristics of the sound changing less dynamically. Consequently, a great deal of memory can be save in a wavetable synthesis system by storing only a short segment of the sustain section of the waveform, and then looping the segment during playback.
Although the sample memory could simply be indexed to using a sample memory address pointer which is incremented using an integer number of samples, this setup allows only a limited set of pitch shifts. To provide a greater range of pitch shifts, the memory pointer is provided with an integer part and a fractional part such that the increment value could be a fractional number of samples. The integer part of the address pointer is used to address the sample memory while the fractional part is used to maintain the frequency accuracy. In such an arrangement, when non-integer increment values are utilized, the frequency resolution for playback is determined by the number of bits used to represent the fractional part of the address pointer and the address increment parameter.
When the fractional part of the address pointer is non-zero, then the desired value falls between available data samples. A number of interpolation approaches can be used. The solution might be as simple as ignoring the fractional part of the address. However, such solution limits the pitch range of the synthesizer. A slightly better approach would be to use the nearest available sample value. The more sophisticated system performs interpolation between available data points in order to obtain a value to be used during playback. These systems interpolate between two points A and B, with fractional value X, using the equation: EQU Vx=A+X(B-A)
As can be seen, each interpolation requires an addition operation, a multiply operation and a subtract operation, not counting the data load operations which can add as many as three operations to the total computational complexity.
In addition to the interpolation, an envelope generator function is provided to create an envelope appropriate for the particular instrument. The envelope generator controls the shape-the rate of the attack, decays, sustain, and release. For many acoustic instruments, the character of the tone which is produced changes as a function of the amplitude level at which the instrument is played. Hence, velocity splits which utilize different sample segments for different note velocities can be implemented to simulate this phenomena. Alternatively, a digital low pass filter for each note with a cutoff frequency which varies as a function of the note velocity can be implemented to dynamically adjust the output frequency spectrum of the synthesized sound as a function of the note velocity. This solution allows a very effective recreation of the acoustic instrument timbre. Filtering operation can also be used to help eliminate noise which generated during the pitch shifting process.
One barrier to providing high fidelity multimedia audio is the available processing power of the computer. High fidelity audio boards such as Sound Blaster Pro boards can sample at rates as high as 44,000 times a second. Even at more typical sampling rates of 16,000 times a second, a stereo sampler can capture as much as 32,000 16-bit samples in a second. The interpolation of each sample requires an addition, a subtraction, a multiplication, and three load operations and thus can add about 200,000 extra operations per second for each sample point to the processing load. This rather significant processing load is incremental to existing load on the processor. Additionally, this increases with multiple instruments, or voices. Twenty-four instruments is common, thus requiring 32,000.times.24 samples/second. Further, the interpolation process requires 32-bit multiply operations to preserve the fidelity of the interpolated sound. Additionally, since sound has to be generated continuously, sufficient reserve processing capacity is needed in order to manipulate or process sound in real-time.
Not surprisingly, the ability to generate quality sound once required special purpose digital signal processing (DSP) devices so that the processor could focus on solving problems on the desktop. However, as such DSP-based solutions add cost, the availability of quality multimedia audio sound has not been a standard part of today's desktop environment.
Due to cost and compatibility reasons, it is an undesirable to add a digital signal processor or a custom processor to the personal computer to perform wavetable processing. Thus, a fast and efficient apparatus and method for performing wavetable processing on a general purpose processor is desired for many applications. Furthermore, it is desirable to accelerate the speed of performing various wavetable processing operations without adversely affecting the compatibility of the personal computer with the installed software base.